package com.example.controller;

import com.example.common.Result;
import com.example.entity.Analysis;
import com.example.service.StatisticalAnalysisService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/statiscalAnalysis")
public class StatisticalAnalysisController {

    @Resource
    StatisticalAnalysisService statisticalAnalysisService;

    /**
     * 获取到统计对象
     * @param analysis
     * @return
     */
    @GetMapping("/selectAll")
    public Result selectAll(Analysis analysis) {
        List<Analysis> list = statisticalAnalysisService.selectAll(analysis);
        return Result.success(list);
    }
}
